import datetime
import screen_brightness_control as sbc

hour_power = {
    8: 20,
    9: 30,
    10: 40,
    11: 40,
    12: 50,
    13: 50,
    14: 40,
    15: 30,
    16: 20,
    17: 10,
    18: 10,
    19: 5,
}

now_t = datetime.datetime.now()
# 以步长5的速度将屏幕亮度从当前值调整到100%
if hour_power.get(now_t.hour):
    sbc.fade_brightness(hour_power.get(now_t.hour), increment=1)
    print(f'>>> 屏幕亮度调整结束 当前亮度 {hour_power[now_t.hour]}<<<')
print(sbc.get_brightness())
